package com.gzy.cbrsystem.insomnia.action;

import java.util.List;

import com.opensymphony.xwork2.ActionSupport;
import com.gzy.cbrsystem.util.Item;
import com.gzy.cbrsystem.util.Search;
public class ShowCaseAll extends ActionSupport {
	
	protected List<Item> seachResult;
	protected Search search;
	protected int num;
	protected String caseType;
	
	public String getCaseType() {
		return caseType;
	}
	public void setCaseType(String caseType) {
		this.caseType = caseType;
	}
	public List<Item> getSeachResult() {
		return seachResult;
	}
	public void setSeachResult(List<Item> seachResult) {
		this.seachResult = seachResult;
	}
	public Search getSearch() {
		return search;
	}
	public void setSearch(Search search) {
		this.search = search;
	}
	public int getNum() {
		return num;
	}
	public void setNum(int num) {
		this.num = num;
	}
	public String execute() throws Exception {
		this.setSeachResult(this.search.showAll(caseType));
		this.setNum(this.seachResult.size());
		return SUCCESS;
	}	
}
